 /**
   * Copyright 2014 Viettel Telecom. All rights reserved.
   * VIETTEL PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
   */
 package com.viettel.core.bussiness.cms; 
import java.util.List; 

import org.springframework.beans.factory.annotation.Autowired; 

import com.viettel.core.exceptions.BusinessException; 
import com.viettel.core.exceptions.DataAccessException; 
import com.viettel.core.dao.cms.MultiMediaItemDAO;
import com.viettel.core.entities.cms.MultiMediaItem;
 /**
   *  Mo ta muc dich cua lop (interface)
   *  @author: TOANTM1
   *  @version:  
   *  @since: 28/02/2014 - 10:38:42
   */
 public class MultiMediaItemMgrImpl implements MultiMediaItemMgr{ 
	@Autowired 
	MultiMediaItemDAO multimediaitemDAO; 
 
 	/**@author TOANTM1
  	 * 28/02/2014 - 10:38:42
  	 * For: 
  	 * @description: 
  	 */
 	@Override 
	public MultiMediaItem getMultiMediaItemById(Integer id) throws BusinessException { 
		try { 
			return  multimediaitemDAO.getMultiMediaItemById(id); 
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	} 
 
 	/**@author TOANTM1
  	 * 28/02/2014 - 10:38:42
  	 * For: 
  	 * @description: 
  	 */
 	@Override 
	public MultiMediaItem createMultiMediaItem(MultiMediaItem multimediaitem) throws BusinessException { 
		try { 
			return multimediaitemDAO.createMultiMediaItem(multimediaitem); 
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	} 
 
 	/**@author TOANTM1
  	 * 28/02/2014 - 10:38:42
  	 * For: 
  	 * @description: 
  	 */
 	@Override 
	public void updateMultiMediaItem(MultiMediaItem multimediaitem) throws BusinessException { 
		try { 
			multimediaitemDAO.updateMultiMediaItem(multimediaitem); 
		} catch (DataAccessException e) {	 
			throw new BusinessException(e); 
		} 
	} 
 
 	/**@author TOANTM1
  	 * 28/02/2014 - 10:38:42
  	 * For: 
  	 * @description: 
  	 */
 	@Override 
	public void deleteMultiMediaItem(MultiMediaItem multimediaitem) throws BusinessException { 
		try { 
			multimediaitemDAO.deleteMultiMediaItem(multimediaitem); 
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	} 
 	
 	@Override 
	public List<MultiMediaItem> getListMultiMediaByObject(Integer objectType, Integer objectId, Integer type)	throws BusinessException { 
		try { 
			return multimediaitemDAO.getListMultiMediaByObject(objectType, objectId, type);
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	} 
} 
